package com.dlyk.mapper;

import com.dlyk.commons.DataScope;
import com.dlyk.model.Customer;
import com.dlyk.query.BaseQuery;
import com.dlyk.result.CustomerExcel;

import java.util.List;

public interface CustomerMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    int insertSelective(Customer record);

    Customer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    /**
     * 根据用户的权限进行过滤（拼接SQL语句）
     */
    @DataScope(tableAlias = "u", tableField = "id")
    List<Customer> selectCustomerListByPage(BaseQuery build);

    List<CustomerExcel> selectCustomerListByExcel(List<String> ids);

    int selectCustomerTotalCount();

    Customer selectCustomerDetailById(Integer id);
}

